<% normalcards.forEach(function(item){ %>
	<div class="item-wrap">
	      <div class="ticket-item<% if (item.effective==0 && item.discard==1) { %> ineffective <% }else if(item.freeze==1){ %> freeze<% }else if(item.effective==1 && item.discard==0){ %> expired<% } %>">
			  <div class="ticket-type">
				  <div class="ticket-price">
					  <% if (item.type=='CASH') { %>
						<strong><%= String(item.youhui).replace(/(\.\d+)/,'<sub>$1</sub>') %></strong><sub>元</sub>
					  <% }else if(item.type=='DISCOUNT'){ %>
							<strong><%= item.youhui %></strong><sub>折</sub>
					  <% }else if(item.type=='GIFT'){ %>
							 <i class="icon-exchange"></i>
					  <% } %> 
				  </div>
				  <div class="ticket-name">
					  <% if (item.type=='CASH') { %>
						代金券
					  <% }else if(item.type=='DISCOUNT'){ %>
						折扣券
					  <% }else if(item.type=='GIFT'){ %>					  
					  兑换券
					  <% } %> 
				  </div>
			  </div> 
			  <div class="ticket-info">
				<div class="figure"></div>
			     <div  class="ticket-title"><%= item.title %></div>
			     <div  class="ticket-validity">有效期至<%= item.end_time %></div>
                 <div class="timemark"></div> 
			  </div>		
		  </div>  
	</div>
<% }) %> 

<% exceptioncards.forEach(function(item){ %>
<div class="item-wrap item-expired">
	<div class="ticket-item<% if (item.effective==0 && item.discard==1) { %> ineffective <% }else if(item.effective==1 && item.discard==0){ %> expired<% } %>">
		<div class="ticket-type">
			<div class="ticket-price">
				<% if (item.type=='CASH') { %>
					<strong><%= item.youhui %></strong><sub>元</sub>
				<% }else if(item.type=='DISCOUNT'){ %>
					<strong><%= item.youhui %></strong><sub>折</sub>
				<% }else if(item.type=='GIFT'){ %>
					礼品券
				<% } %> 
			</div>
			<div class="ticket-name">
				<% if (item.type=='CASH') { %>
					代金券
				<% }else if(item.type=='DISCOUNT'){ %>
					折扣券
				<% }else if(item.type=='GIFT'){ %>					  
					兑换券
				<% } %> 
			</div>
		</div> 
		<div class="ticket-info">
			<div class="figure"></div>
			<div  class="ticket-title"><%= item.title %></div>
			<div  class="ticket-validity">有效期至<%= item.end_time %></div>
			<div class="timemark"></div> 
		</div>		
	</div>  
</div>
<% }) %> 